package com.taptech.doufu.db.history;
import com.taptech.doufu.constant.Constant;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;


public class NovelHirstoryHelper extends SQLiteOpenHelper  {
	public static final String DBNAME = "readHirstory.db";
	public static final String TABLE_NAME_HIRSTORY = "readHirstory";
	public NovelHirstoryHelper(Context context) {
		super(context, DBNAME, null, Constant.DB_VERSION);
		// TODO Auto-generated constructor stub
	}
	
 
	@Override
	public void onCreate(SQLiteDatabase db) {
		// TODO Auto-generated method stub
		db.execSQL("CREATE TABLE " + TABLE_NAME_HIRSTORY + " ("+
				"_ID INTEGER PRIMARY KEY autoincrement, "
				+ "novelid VARCHAR(1024), "
				+ "sectionid VARCHAR(1024) ,"
				+ "cartoonid VARCHAR(1024) ,"
				+ "episodepos VARCHAR(1024) "
				+ ");");
	}
	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
//		db.execSQL("ALTER TABLE "+TABLE_NAME_HIRSTORY
//				+" ADD column cartoonid VARCHAR(1024);"
//				);
//		db.execSQL("ALTER TABLE "+TABLE_NAME_HIRSTORY
//						+" ADD column episodepos VARCHAR(1024);"
//		);
	}


}
